<template>
  <section class="container" :class="{'menu-open':menuOpen}"> <!--最外层容器-->
    <section class="menu"><!--左边的容器-->
      <menus></menus> <!--按钮组件-->
    </section>
    <div class="content-overlay" @click="$store.dispatch('updateMenu')"></div>
    <section class="content-container"><!--右边的容器-->
      <router-view></router-view>
    </section>
  </section>  
</template>

<script>
    import menus from './menus';      //导入创建的menus组件
    import todo from './todo';
    export default {
      components:{ //注册menus组件，让其可以在template调用
        menus,
        todo
      },
      computed:{
        menuOpen() {
          return this.$store.state.menuOpen;
        }
      }
    };
</script>

<style lang="less">
@import '../common/style/layouts.less';
</style>



